package com.biubiu.biubiuexam.nosql.repository;

import com.biubiu.biubiuexam.nosql.model.Exam;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * The interface Exam repository.
 */
public interface ExamRepository extends MongoRepository<Exam, String> {

    /**
     * Find exam by link exam.
     *
     * @param link the link
     * @return the exam
     */
    Exam findExamByLink(String link);

    /**
     * Find all exam by clazz id list.
     *
     * @param clazzId the clazz id
     * @return the list
     */
    List<Exam> findAllExamByClazzId(Long clazzId);

    long count();
}
